import Vue from 'vue';
import App from './App.vue';

// 组件
import home from './components/Home.vue'

// 引入滚动模块
import infiniteScroll from 'vue-infinite-scroll';
Vue.use(infiniteScroll);

// 引入图片懒加载模块
import VueLazyload from 'vue-lazyload';
Vue.use(VueLazyload);

// 集成axios
import axios from 'axios';
Vue.prototype.$http = axios;

// 集成vue-router
import vuerouter from 'vue-router';
Vue.use(vuerouter);

var router = new vuerouter({
  routes: [
    { 
      path: '*', 
      redirect: '/home'
    },
    {
      path:'/home',
      component:home
    }
  ]
});

new Vue({
  el: '#app',
  router,
  render: c => c(App)
})
